/*
 * Arm SCP/MCP Software
 * Copyright (c) 2019-2024, Arm Limited and Contributors. All rights reserved.
 *
 * SPDX-License-Identifier: BSD-3-Clause
 *
 * Description:
 *     Definitions for SCMI and TRANSPORT module configurations.
 */

#ifndef JUNO_SCMI_H
#define JUNO_SCMI_H

enum juno_scmi_agent_idx {
    /* 0 is reserved for the platform */
    JUNO_SCMI_AGENT_IDX_OSPM = 1,
    JUNO_SCMI_AGENT_IDX_PSCI,
    JUNO_SCMI_AGENT_IDX_COUNT,
};

enum juno_scmi_service_idx {
    JUNO_SCMI_SERVICE_IDX_PSCI_A2P,
    JUNO_SCMI_SERVICE_IDX_OSPM_A2P_0,
    JUNO_SCMI_SERVICE_IDX_OSPM_A2P_1,
#ifdef BUILD_HAS_SCMI_NOTIFICATIONS
    JUNO_SCMI_SERVICE_IDX_OSPM_P2A,
#endif
    JUNO_SCMI_SERVICE_IDX_COUNT,
};

/* SCP<->AP Fast channels indexes */
#ifdef BUILD_HAS_SCMI_PERF_FAST_CHANNELS
enum juno_plat_fch_idx {
    /* Fast channels from 0 - 3 */
    JUNO_PLAT_FCH_BIG_LEVEL_SET,
    JUNO_PLAT_FCH_BIG_LIMIT_SET,
    JUNO_PLAT_FCH_BIG_LEVEL_GET,
    JUNO_PLAT_FCH_BIG_LIMIT_GET,

    /* Fast channels from 4 - 7 */
    JUNO_PLAT_FCH_LITTLE_LEVEL_SET,
    JUNO_PLAT_FCH_LITTLE_LIMIT_SET,
    JUNO_PLAT_FCH_LITTLE_LEVEL_GET,
    JUNO_PLAT_FCH_LITTLE_LIMIT_GET,

    /* Fast channels from 8 - 11 */
    JUNO_PLAT_FCH_GPU_LEVEL_SET,
    JUNO_PLAT_FCH_GPU_LIMIT_SET,
    JUNO_PLAT_FCH_GPU_LEVEL_GET,
    JUNO_PLAT_FCH_GPU_LIMIT_GET,

    JUNO_PLAT_FCH_COUNT,
};
#endif

/* SCP <-> AP Transport channels */
enum juno_transport_channel_idx {
    JUNO_TRANSPORT_SCMI_SERVICE_PSCI,
    JUNO_TRANSPORT_SCMI_SERVICE_OSPM_0,
    JUNO_TRANSPORT_SCMI_SERVICE_OSPM_1,

#if defined(BUILD_HAS_SCMI_NOTIFICATIONS)
    JUNO_TRANSPORT_SCMI_SERVICE_OSPM_P2A,
#endif

#if defined(BUILD_HAS_SCMI_PERF_FAST_CHANNELS)
    JUNO_TRANSPORT_SCMI_PERF_FCH_BIG_LEVEL_SET,
    JUNO_TRANSPORT_SCMI_PERF_FCH_BIG_LIMIT_SET,
    JUNO_TRANSPORT_SCMI_PERF_FCH_BIG_LEVEL_GET,
    JUNO_TRANSPORT_SCMI_PERF_FCH_BIG_LIMIT_GET,

    JUNO_TRANSPORT_SCMI_PERF_FCH_LITTLE_LEVEL_SET,
    JUNO_TRANSPORT_SCMI_PERF_FCH_LITTLE_LIMIT_SET,
    JUNO_TRANSPORT_SCMI_PERF_FCH_LITTLE_LEVEL_GET,
    JUNO_TRANSPORT_SCMI_PERF_FCH_LITTLE_LIMIT_GET,

    JUNO_TRANSPORT_SCMI_PERF_FCH_GPU_LEVEL_SET,
    JUNO_TRANSPORT_SCMI_PERF_FCH_GPU_LIMIT_SET,
    JUNO_TRANSPORT_SCMI_PERF_FCH_GPU_LEVEL_GET,
    JUNO_TRANSPORT_SCMI_PERF_FCH_GPU_LIMIT_GET,
#endif
    JUNO_TRANSPORT_CHANNELS_COUNT,
};

#endif /* JUNO_SCMI_H */
